package com.xuzq.bookstore.ware.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xuzq.bookstore.ware.entity.WareSkuEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

/**
 * 商品库存
 * 
 * @author xuzq
 * @email zhenqiangxv@qq.com
 * @date 2021-03-22 18:04:06
 */
@Mapper
@Component
public interface WareSkuDao extends BaseMapper<WareSkuEntity> {
    void addStock(@Param("skuId") Long skuId, @Param("wareId") Long wareId, @Param("skuNum") Integer skuNum);

    Long getSkuStock(@Param("item") Long item);
}
